package com.we823.project.model.repo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.we823.project.model.BaseModelWithDate;

@Entity
@Table(name="repo_material_stock")
@NamedQuery(name="MaterialStockModel.findAll", query="SELECT m FROM MaterialStockModel m")
public class MaterialStockModel extends BaseModelWithDate {
	private static final long serialVersionUID = 1L;

	private int day=0;

	@Column(name="material_code")
	private String materialCode;
	
	@Transient
	private String materialName;
	@Transient
	private MaterialModel materialModel;

	@Transient
	private String model;
	
	private int month=0;

	@Column(name="repo_id")
	private int repoId=0;

	private float stock=0;
	@Column(name="last_stock")
	private float lastStock = 0;
	@Transient
	private String unit;

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	private int year=0;

	public MaterialStockModel() {
	}

	public int getDay() {
		return this.day;
	}

	public void setDay(int day) {
		this.day = day;
	}

	public String getMaterialCode() {
		return this.materialCode;
	}

	public void setMaterialCode(String materialCode) {
		this.materialCode = materialCode;
	}

	public int getMonth() {
		return this.month;
	}

	public void setMonth(int month) {
		this.month = month;
	}

	public int getRepoId() {
		return this.repoId;
	}

	public void setRepoId(int repoId) {
		this.repoId = repoId;
	}

	public float getStock() {
		return this.stock;
	}

	public void setStock(float stock) {
		this.stock = stock;
	}

	public int getYear() {
		return this.year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public float getLastStock() {
		return lastStock;
	}

	public void setLastStock(float lastStock) {
		this.lastStock = lastStock;
	}

	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}

	public MaterialModel getMaterialModel() {
		return materialModel;
	}

	public void setMaterialModel(MaterialModel materialModel) {
		this.materialModel = materialModel;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	
}